# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kinit
pkgver=5.72.0
pkgrel=0
pkgdesc="Process launcher to speed up launching KDE applications"
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="qt5-qtbase-dev libcap-dev kservice-dev kio-dev ki18n-dev kwindowsystem-dev kcrash-dev kconfig-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kinit-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="a18ca2d8395964284b78fe662b2eac9141df9451e8de47a4a0d80f64226e8228d45382dd4bdaf4b29bbb6ae79f549fb5405a7206fd4fe266f4a6cc7643e51c39  kinit-5.72.0.tar.xz"
